package com.blocks.generator.plugin;

import java.net.URL;
import java.net.URLClassLoader;

/**
 * @author <a href="mailto:idler41@163.com">linfuxin</a> created by 2022-06-17 20:30:52
 */
public class PluginLoader {

    public static void main(String[] args) throws Exception {
        URL url = new URL("file:/E:/");
        ClassLoader loader = new URLClassLoader(new URL[]{url});
        Class<?> clazz = loader.loadClass("com.zjl.cloud.avics.constant.AppConstant");
        System.out.println(clazz.getFields()[0].getName());
        System.out.println(clazz.newInstance());
    }
}
